-- GENERATED SPELL FOR [Nethergarde Engineer] --


function spell0_5997(pUnit, Event) --@Bomb,n/a--
pUnit:FullCastSpellOnTarget(8858,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5997', 2000, 1)
end

function spell1_5997(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(6660,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5997', 564, 1)
end

function Sorts_5997(pUnit, Event)
local choix_sorts_5997 = math.random(0, 1)
if choix_sorts_5997 == 0 then
pUnit:RegisterEvent('spell0_5997', 1, 1)
end
if choix_sorts_5997 == 1 then
pUnit:RegisterEvent('spell1_5997', 1, 1)
end
end

function mob5997_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_5997', math.random(1500, 3000), 1)
end

function mob5997_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5997_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5997_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(5997, 1, 'mob5997_Action')
RegisterUnitEvent(5997, 2, 'mob5997_Leave')
RegisterUnitEvent(5997, 3, 'mob5997_Kill')
RegisterUnitEvent(5997, 4, 'mob5997_Die')
